<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="../templates/ui.xhtml">

	<ui:define name="content">
		<h1 class="title ui-widget-header ui-corner-all">Tooltip</h1>
		<div class="entry">
			<p>Tooltip has various customization options such as effects, events and custom content support. If value of
            tooltip is not provided, title of the target is used instead.</p>

            <h:panelGrid columns="3" cellpadding="5">

                <h:outputText value="Focus/Blur: " />
                <p:inputText id="focus" title="This tooltip is displayed when input gets the focus"/>
                <p:tooltip id="toolTipFocus" for="focus" showEvent="focus" hideEvent="blur" />

                <h:outputText value="Fade: " />
                <h:outputLink id="fade" value="#">
                    <h:outputText value="Fade Effect" />
                </h:outputLink>
                <p:tooltip id="toolTipFade" for="fade" value="Fade effect is used by default" 
                           showEffect="fade" hideEffect="fade" />

                <h:outputText value="Slide: " />
                <h:outputLink id="slide" value="#">
                    <h:outputText value="Slide Effect" />
                </h:outputLink>
                <p:tooltip id="toolTipSlide" for="slide" value="This tooltip uses slide effect for the animation"
                                    showEffect="slide" hideEffect="slide" />

                <h:outputText value="Clip/Explode: " />
                <h:outputLink id="grow" value="#">
                    <h:outputText value="Clip/Explode Effects" />
                </h:outputLink>
                <p:tooltip id="toolTipGrow" for="grow" value="This tooltip uses clip/explode effects for the animation"
                        showEffect="clip" hideEffect="explode" />

                <h:outputText value="Content:  " />
                <h:outputLink id="lnk" value="#">
                    <h:outputText value="PrimeFaces" />
                </h:outputLink>
                <p:tooltip id="toolTipLnk" for="lnk">
                    <p:graphicImage id="primeLogo" value="/images/prime_logo.png" />
                </p:tooltip>

            </h:panelGrid>

			<h3>Source</h3>
            <p:tabView>
                <p:tab title="tooltipOptions.xhtml">
                    <pre name="code" class="xml">
&lt;h:panelGrid columns="3" cellpadding="5"&gt;

    &lt;h:outputText value="Focus/Blur: " /&gt;
    &lt;p:inputText id="focus" title="This tooltip is displayed when input gets the focus"/&gt;
    &lt;p:tooltip for="focus" showEvent="focus" hideEvent="blur" /&gt;

    &lt;h:outputText value="Fade: " /&gt;
    &lt;h:outputLink id="fade" value="\#"&gt;
        &lt;h:outputText value="Fade Effect" /&gt;
    &lt;/h:outputLink&gt;
    &lt;p:tooltip for="fade" value="Fade effect is used by default" showEffect="fade" hideEffect="fade" /&gt;

    &lt;h:outputText value="Slide: " /&gt;
    &lt;h:outputLink id="slide" value="\#"&gt;
        &lt;h:outputText value="Slide Effect" /&gt;
    &lt;/h:outputLink&gt;
    &lt;p:tooltip for="slide" value="This tooltip uses slide effect for the animation" showEffect="slide" hideEffect="slide" /&gt;

    &lt;h:outputText value="Clip/Explode: " /&gt;
    &lt;h:outputLink id="grow" value="\#"&gt;
        &lt;h:outputText value="Clip/Explode Effects" /&gt;
    &lt;/h:outputLink&gt;
    &lt;p:tooltip for="grow" value="This tooltip uses clip/explode effects for the animation" showEffect="clip" hideEffect="explode" /&gt;

    &lt;h:outputText value="Content:  " /&gt;
    &lt;h:outputLink id="lnk" value="\#"&gt;
        &lt;h:outputText value="PrimeFaces" /&gt;
    &lt;/h:outputLink&gt;
    &lt;p:tooltip for="lnk"&gt;
        &lt;p:graphicImage value="/images/prime_logo.png" /&gt;
    &lt;/p:tooltip&gt;

&lt;/h:panelGrid&gt;
                    </pre>
                </p:tab>
            </p:tabView>

		</div>
	</ui:define>
</ui:composition>